import java.util.Scanner;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User: Administrator
 * Data: 2023 - 04 - 16
 * Time: 16:13
 */
//获取一个数二进制序列中所有的偶数位和奇数位
public class test6 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println("偶数位有");
        for(int i = 31; i >= 1; i -= 2){
            System.out.print(((n >>> i) & 1) + " ");
        }
        System.out.println("\n");
        System.out.println("奇数位有");
        for(int i = 30; i >= 0; i -= 2){
            System.out.print(((n >>> i) & 1) + " ");
        }
    }
}
